import * as React from "react";
import { Dispatch } from "redux";
import { connect } from "react-redux";
import { withRouter } from 'react-router';
import { renderRoutes } from 'react-router-config'
import { Redirect } from 'react-router-dom'
import Cookies from 'js-cookie';
import { rootReducer, RootState } from "@/store/index";
import * as mainservices from "@services/index";
import * as CommonActions from "@/store/common/actions";
import * as CommonTypes from "@/store/common/types";
import "normalize.css";
import "@assets/styles/reset";
import "@assets/styles/fonts";
import styles from "./App.less";
const HomepageComp = React.lazy(() => import('@/pages/homepage/index'));

const App = (props: any) => {
  return (
    <div className={styles.wrapper}>
      <HomepageComp />
    </div>
  )
}

const mapStateToProps = (state: RootState) => state;
const mapDispatchToProps = (dispatch: Dispatch) => ({
  setToken: (data: string) => dispatch(CommonActions.setToken(data)),
});

export default connect(mapStateToProps, mapDispatchToProps)(App);